// 进入全屏
export function enterFullScreen() {
  // 获取layout的dom元素
  const parentNode: any = document.documentElement // 获取需要全屏的元素;
  // 进入全屏
  if (parentNode.requestFullscreen) {
    parentNode.requestFullscreen()
  } else if (parentNode.webkitRequestFullScreen) {
    parentNode.webkitRequestFullScreen()
  } else if (parentNode.mozRequestFullScreen) {
    parentNode.mozRequestFullScreen()
  } else if (parentNode.msRequestFullscreen) {
    // IE11
    parentNode.msRequestFullscreen()
  }
}
// 退出全屏
export function exitFullscreen() {
  if (document.exitFullscreen) {
    document.exitFullscreen()
  } else if ((document as any).webkitCancelFullScreen) {
    ;(document as any).webkitCancelFullScreen()
  } else if ((document as any).mozCancelFullScreen) {
    ;(document as any).mozCancelFullScreen()
  } else if ((document as any).msExitFullscreen) {
    ;(document as any).msExitFullscreen()
  }
}

// 判空
export function isEmptyData(data: any) {
  const emptyArr = [undefined, null, '']
  return emptyArr.includes(data)
}
